--[[   Morph Definition File

Morph parameters description
local morphDefs = {		--beginig of morphDefs
	unitname = {		--unit being morphed
		into = 'newunitname',		--unit in that will morphing unit morph into
		time = 12,			--time required to complete morph process (in seconds)
		require = 'requnitname',	--unit requnitname must be present in team for morphing to be enabled
		metal = 10,			--required metal for morphing process     note: if you ommit M and/or E costs, morph costs the
		energy = 10,			--required energy for morphing process		difference in costs between unitname and newunitname
		xp = 0.07,			--required experience for morphing process (will be deduced from unit xp after morph, default=0)
		rank = 1,			--required unit rank for morphing to be enabled, if ommited, morph doesn't require rank
		tech = 2,			--required tech level of a team for morphing to be enabled (1,2,3), if ommited, morph doesn't require tech
		cmdname = 'Ascend',		--if ommited will default to "Upgrade"
		texture = 'MyIcon.dds',		--if ommited will default to [newunitname] buildpic, textures should be in "LuaRules/Images/Morph"
		text = 'Description',		--if ommited will default to "Upgrade into a [newunitname]", else it's "Description"
						--you may use "$$unitname" and "$$into" in 'text', both will be replaced with human readable unit names 
	},
}				--end of morphDefs
--]]

local devolution = (-1 > 0)

local morphDefs = {
	armcom = {
		into = 'armcom1',
		time = 30,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	armcom1 = {
		into = 'armcom2',
		time = 45,
		xp = 0.05,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	armcom2 = {
		into = 'armcom3',
		time = 60,
		xp = 0.1,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	armcom3 = {
		into = 'ARMCOM4',
		time = 75,
		xp = 0.15,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	ARMCOM4 = {
		into = 'armcom5',
		time = 90,
		xp = 0.2,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	armcom5 = {
		into = 'armcom6',
		time = 105,
		xp = 0.25,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	armcom6 = {
		into = 'armcom7',
		time = 120,
		xp = 0.3,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	corcom = {
		into = 'corcom1',
		time = 30,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	corcom1 = {
		into = 'corcom2',
		time = 45,
		xp = 0.05,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	corcom2 = {
		into = 'corcom3',
		time = 60,
		xp = 0.1,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	corcom3 = {
		into = 'corcom4',
		time = 75,
		xp = 0.15,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	corcom4 = {
		into = 'corcom5',
		time = 90,
		xp = 0.2,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	corcom5 = {
		into = 'corcom6',
		time = 105,
		xp = 0.25,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	corcom6 = {
		into = 'corcom7',
		time = 120,
		xp = 0.3,
		cmdname = 'Level Up',
		text = 'Level Up to $$into',
	},
	armflash = {
		into = 'ARMFLASH1',
		time = 12,
		require = 'arm_vehicle_plant',
	},
	armstump = {
		into = 'ARMSTUMP1',
		time = 12,
		require = 'arm_vehicle_plant',
	},
	armsam = {
		into = 'ARMSAM1',
		time = 12,
		require = 'arm_vehicle_plant',
	},
	armjanus = {
		into = 'ARMJANUS1',
		time = 12,
		require = 'arm_vehicle_plant',
	},
	tawf013 = {
		into = 'tawf0131',
		time = 12,
		require = 'arm_vehicle_plant',
	},
	armflea = {
		into = 'ARMFLEA1',
		time = 12,
		require = 'arm_kbot_lab',
	},
	armpw = {
		into = 'ARMPW1',
		time = 12,
		require = 'arm_kbot_lab',
	},
	armrock = {
		into = 'ARMROCK1',
		time = 12,
		require = 'arm_kbot_lab',
	},
	armham = {
		into = 'ARMHAM1',
		time = 12,
		require = 'arm_kbot_lab',
	},
	armfig = {
		into = 'ARMFIG1',
		time = 12,
		require = 'ARMAP1',
	},
	armatlas = {
		into = 'ARMATLAS1',
		time = 12,
		require = 'ARMAP1',
	},
	armfido = {
		into = 'ARMFIDO1',
		time = 25,
		require = 'ARMALAB1',
	},
	armmav = {
		into = 'ARMMAV1',
		time = 25,
		require = 'ARMALAB1',
	},
	armfboy = {
		into = 'ARMFBOY1',
		time = 35,
		require = 'ARMALAB1',
	},
	armzeus = {
		into = 'ARMZEUS1',
		time = 25,
		require = 'ARMALAB1',
	},
	armsnipe = {
		into = 'ARMSNIPE1',
		time = 35,
		require = 'ARMALAB1',
	},
	armpt = {
		into = 'ARMPT1',
		time = 12,
		require = 'ARMSY1',
	},
	armroy = {
		into = 'ARMROY1',
		time = 25,
		require = 'ARMSY1',
	},
	armcrus = {
		into = 'ARMCRUS1',
		time = 35,
		require = 'ARMASY1',
	},
	armmship = {
		into = 'ARMMSHIP1',
		time = 35,
		require = 'ARMASY1',
	},
	armmanni = {
	   {
		into = 'ARMDPENTR',
		time = 45,
		require = 'ARMAVP1',
	   },
	   {
		into = 'ARMDEFL',
		time = 25,
		xp = 0.15,
	   },
	},
	ARMAAP = {
		into = 'ARMAAP1',
		time = 50,
	},
	ARMAVP = {
		into = 'ARMAVP1',
		time = 50,
	},
	ARMALAB = {
		into = 'ARMALAB1',
		time = 50,
	},
	ARMASY = {
		into = 'ARMASY1',
		time = 50,
	},
	armvp = {
		into = 'arm_vehicle_plant',
		time = 40,
	},
	armlab = {
		into = 'arm_kbot_lab',
		time = 40,
	},
	armap = {
		into = 'armap1',
		time = 40,
	},
	armsy = {
		into = 'armsy1',
		time = 40,
	},
	armrad = {
		into = 'ARMRAD1',
		time = 20,
	},
	ARMRAD1 = {
		into = 'armarad',
		time = 35,
	},
	armarad = {
		into = 'armxrad',
		time = 55,
	},
	armfark = {
		into = 'ARMFARK1',
		time = 15,
	},
	armrl = {
		into = 'ARMRL1',
		time = 15,
	},
	armcir = {
		into = 'armcir1',
		time = 30,
	},
	armguard = {
		into = 'arm_guardian',
		time = 40,
	},
	armllt = {
		into = 'ARMLLT1',
		time = 15,
	},
	armclaw = {
		into = 'ARMCLAW1',
		time = 25,
	},
	armhlt = {
		into = 'ARMHLT1',
		time = 25,
	},
	mercury = {
		into = 'cadmium',
		time = 45,
	},
	armanni = {
		into = 'armoblit',
		time = 90,
	},
	armmex = {
	  {
		into = 'armamex',
		time = 20,
	  },
	  {
		into = 'armupmex',
		time = 25,
	  },
	},
	armmakr = {
		into = 'AMetalMakerLvl1',
		time = 25,
	},
	armsolar = {
		into = 'armadvsol',
		time = 35,
	},
	armwin = {
		into = 'arm_wind_generator',
		time = 15,
	},
	armtide = {
		into = 'armutide',
		time = 20,
	},
	armfus = {
		into = 'armckfus',
		time = 40,
	},
	ARMGATE2 = {
		into = 'armgate',
		time = 60,
	},
	armgate1 = {
		into = 'ARMGATE3',
		time = 240,
	},
	corrl = {
		into = 'CORRL1',
		time = 15,
	},
	corerad = {
		into = 'CORERAD1',
		time = 30,
	},
	corllt = {
	  {
		into = 'CORLLT1',
		time = 15,
	  },
	  {
		into = 'HLLT',
		time = 15,
	  },
	},
	cormaw = {
		into = 'CORMAW1',
		time = 25,
	},
	corhlt = {
		into = 'CORHLT1',
		time = 25,
	},
	corpun = {
		into = 'core_punisher',
		time = 40,
	},
	screamer = {
		into = 'shrieker',
		time = 45,
	},
	cordoom = {
		into = 'corapocalypse',
		time = 90,
	},
	cormex = {
	  {
		into = 'corexp',
		time = 25,
	  },
	  {
		into = 'corupmex',
		time = 25,
	  },
	},
	cormoho = {
		into = 'cormexp',
		time = 40,
	},
	cormakr = {
		into = 'CMetalMakerLvl1',
		time = 25,
	},
	corsolar = {
		into = 'coradvsol',
		time = 35,
	},
	corwin = {
		into = 'core_wind_generator',
		time = 15,
	},
	cortide = {
		into = 'corutide',
		time = 20,
	},
	corfus = {
		into = 'corckfus',
		time = 40,
	},
	CORAAP = {
		into = 'CORAAP1',
		time = 50,
	},
	CORAVP = {
		into = 'CORAVP1',
		time = 50,
	},
	CORALAB = {
		into = 'CORALAB1',
		time = 50,
	},
	CORASY = {
		into = 'CORASY1',
		time = 50,
	},
	corvp = {
		into = 'core_vehicle_plant',
		time = 40,
	},
	corlab = {
		into = 'core_kbot_lab',
		time = 40,
	},
	corap = {
		into = 'corap1',
		time = 40,
	},
	corsy = {
		into = 'corsy1',
		time = 40,
	},
	corrad = {
		into = 'CORRAD1',
		time = 20,
	},
	CORRAD1 = {
		into = 'corarad',
		time = 35,
	},
	corarad = {
		into = 'armxrad',
		time = 55,
	},
	CORGATE2 = {
		into = 'corgate',
		time = 60,
	},
	CORGATE1 = {
		into = 'corgate3',
		time = 240,
	},
	corfav = {
		into = 'CORFAV1',
		time = 12,
		require = 'core_vehicle_plant',
	},
	corgator = {
		into = 'CORGATOR1',
		time = 12,
		require = 'core_vehicle_plant',
	},
	CORLEVLR = {
		into = 'CORLEVLR1',
		time = 12,
		require = 'core_vehicle_plant',
	},
	cormist = {
		into = 'CORMIST1',
		time = 12,
		require = 'core_vehicle_plant',
	},
	corraid = {
		into = 'CORRAID1',
		time = 12,
		require = 'core_vehicle_plant',
	},
	corwolv = {
		into = 'CORWOLV1',
		time = 12,
		require = 'core_vehicle_plant',
	},
	corthud = {
		into = 'CORTHUD1',
		time = 12,
		require = 'core_kbot_lab',
	},
	corstorm = {
		into = 'CORSTORM1',
		time = 12,
		require = 'core_kbot_lab',
	},
	corak = {
		into = 'CORAK1',
		time = 12,
		require = 'core_kbot_lab',
	},
	corveng = {
		into = 'CORVENG1',
		time = 12,
		require = 'CORAP1',
	},
	corvalk = {
		into = 'CORVALK1',
		time = 12,
		require = 'CORAP1',
	},
	corpt = {
		into = 'CORPT1',
		time = 12,
		require = 'CORSY1',
	},
	corroy = {
		into = 'CORROY1',
		time = 25,
		require = 'CORSY1',
	},
	corpyro = {
		into = 'CORPYRO1',
		time = 25,
		require = 'CORALAB1',
	},
	corcan = {
		into = 'CORCAN1',
		time = 25,
		require = 'CORALAB1',
	},
	coramph = {
		into = 'CORAMPH1',
		time = 25,
		require = 'CORALAB1',
	},
	corsumo = {
		into = 'CORSUMO1',
		time = 35,
		require = 'CORALAB1',
	},
	corcrus = {
		into = 'CORCRUS1',
		time = 35,
		require = 'CORASY1',
	},
	cormship = {
		into = 'CORMSHIP1',
		time = 35,
		require = 'CORASY1',
	},
	armamd = {
		into = 'armamd1',
		time = 90,
	},
	corfmd = {
		into = 'corfmd1',
		time = 90,
	},
	armscab = {
		into = 'armscab1',
		time = 120,
	},
	cormabm = {
		into = 'cormabm1',
		time = 120,
	},
	armack = {
		into = 'armack1',
		time = 45,
	},
	corack = {
		into = 'corack1',
		time = 45,
	},
}



--
-- Here's an example of why active configuration
-- scripts are better then static TDF files...
--

--
-- devolution, babe  (useful for testing)
--
if (devolution) then
  local devoDefs = {}
  for src,data in pairs(morphDefs) do
    devoDefs[data.into] = { into = src, time = 10, metal = 1, energy = 1 }
  end
  for src,data in pairs(devoDefs) do
    morphDefs[src] = data
  end
end


return morphDefs

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
